package com.kordar.auth;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("sys_admin")
public class Admin {

    final static int SUPER_ADMIN = 9;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id = 0L;
    private String phone;
    private String avatar;
    private String username;
    private String password;
    private Integer status;
    private Integer type;
    private String salt;

    @Version
    private Integer version;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
